<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>成绩查询</title>
    <link href="{{asset('/bst/css/bootstrap.min.css')}}" rel="stylesheet" >
</head>
<body>

<div style="margin-top: 20px" class="container-fluid">
    <div class="input-group mb-3">
        <span class="input-group-text "  id="basic-addon1">姓名：</span>
        <input name="username" type="text" class="form-control" placeholder="" aria-label="" aria-describedby="basic-addon1">
    </div>
    <p></p>
    <div class="input-group mb-3">
        <span class="input-group-text" id="basic-addon1">密码：</span>
        <input name="pwd" type="text" class="form-control" placeholder="" aria-label="" aria-describedby="basic-addon1">
    </div>
    <p></p><p></p>
    <div style="text-align: right" >
        <button  type="button" id="button" class="btn btn-primary">查询</button>
    </div>
    <p></p><p></p>
    <div>
        <ul class="list-group">

        </ul>
    </div>


</div>

<script src="{{asset('common/js/jquery-3.4.1.min.js')}}" ></script>
<script>

    $("#button").click(function () {
        var username = $("input[name=username]").val()
        var pwd = $("input[name=pwd]").val()
        $.get("/point?username="+username+"&pwd="+pwd,function (res) {
            if(res.status){
                var info = res.data.records
                var html = ''
                html+= '<li class="list-group-item"> 成绩：'+info[0]+'</li>'
                html+= '<li class="list-group-item"> 名次：'+info[1]+'</li>'
                $('.list-group').append(html)
            }
        },'json')
    })

</script>


</body>
</html>
